package com.van.bo.badwrting.edit.domain;

import org.apache.commons.lang3.StringUtils;

/**
 * @author van
 * 2021年01月09日20:02:33
 * <p>
 * 封装列表查询条件
 */
public class ParamData {

    private int pageNo = 1;
    private String id;
    private int pageSize = 40;
    private String search;

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        if (pageNo < 0)
            return;
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageIndex() {

        return (pageNo - 1) * pageSize;
    }

    public String getSearch() {
        return StringUtils.trim(search);
    }

    public void setSearch(String search) {
        this.search = search;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
